From: Luca Bacci Date: Tue, 14 Dec 2021 17:32:51 +0000 (+0100) Subject: Remove WM_SYNCPAINT message handler X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~61^2^2~128^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7a1004df7313518c5a9edf272000c502a33b5b47;p=gtk4.git Remove WM_SYNCPAINT message handler It was added to work around what seemed to be an OS or graphics driver issue on Windows XP. The issue was not reproducible on Windows Vista anyway. References: * https://bugzilla.gnome.org/show_bug.cgi?id=153567 * https://gitlab.gnome.org/GNOME/gtk/-/commit/c8fef535 * https://devblogs.microsoft.com/oldnewthing/20120723-00/?p=7073 --- diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index 6327cca1c2..bc7590aa13 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -157,7 +157,6 @@ static HKL latin_locale = NULL; static gboolean in_ime_composition = FALSE; static UINT modal_timer; -static UINT sync_timer = 0; static int debug_indent = 0; @@ -1453,23 +1452,6 @@ _gdk_win32_end_modal_call (GdkWin32ModalOpKind kind) } } -static VOID CALLBACK -sync_timer_proc (HWND hwnd, - UINT msg, - UINT_PTR id, - DWORD time) -{ - MSG message; - if (PeekMessageW (&message, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE)) - { - return; - } - - RedrawWindow (hwnd, NULL, NULL, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ALLCHILDREN); - - KillTimer (hwnd, sync_timer); -} - static gboolean handle_nchittest (HWND hwnd, GdkSurface *window, @@ -2854,12 +2836,6 @@ gdk_event_translate (MSG *msg, *ret_valp = 1; break; - case WM_SYNCPAINT: - sync_timer = SetTimer (GDK_SURFACE_HWND (window), - 1, - 200, sync_timer_proc); - break; - case WM_PAINT: handle_wm_paint (msg, window); break;